Skip to content

fix: preserve nested dates in throttle keys - #398

Open
fbirds5230 wants to merge 1 commit into
fullstack-build:masterfrom
fbirds5230:fix/nested-date-throttle-keys
Open

fbirds5230 wants to merge 1 commit into
fullstack-build:masterfrom
fbirds5230:fix/nested-date-throttle-keys

Conversation

@fbirds5230

Copy link
Copy Markdown

The throttle key handles top-level Dates, but nested Dates reach the generic object serializer and become {}. Two structured log messages that differ only in a nested timestamp therefore share a key, and the later message gets dropped.

Serialize nested Dates with the same timestamp-based representation used at the top level. The existing depth limit stays in place, and Date values remain distinct from plain objects, strings and numbers.

The new tests exercise the public logger pipeline with nested objects and arrays: equal timestamps are suppressed, different timestamps are emitted, and the repeat count stays correct. Both tests fail before the change.

Validation with Node 22.23.5:

  • All 1,713 tests in 89 files pass, with 100% statement, branch, function and line coverage.
  • TypeScript, ESM and browser builds, publish preparation, Biome checks, documentation sync and all three bundle-size checks pass.

The separate browser, Bun, Deno and framework CI jobs were not run locally.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant